package com.lsu.command.homework;

/**
 * 测试程序
 *
 * @Author wang suo
 * @Date 2020/10/20 0020 19:31
 * @Version 1.0
 */
public class CommandTest {
    public static void main(String[] args) {
        MakeDir makeDir = new MakeDir();
        Command command = new ConcreteCommand(makeDir);
        RequestMakeDir requestMakeDir = new RequestMakeDir();
        requestMakeDir.setCommand(command);
        // 创建 3 个测试文件
        requestMakeDir.startExecuteCommand("test1");
        requestMakeDir.startExecuteCommand("test2");
        requestMakeDir.startExecuteCommand("test3");
        // 重建文件
        requestMakeDir.redoCommand();
        // 撤销创建的文件
        requestMakeDir.undoCommand();
    }
}
